package com.xxx.print;

import java.io.*;
import java.nio.charset.MalformedInputException;

/**
 * @version v1.0
 * @Description:
 * @Author zhanzhongxin
 * @Date 2021/7/23 10:59
 * @Copyright 博为峰
 */
public class PrintWriterDemo {
    public static void main(String[] args) {
//        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("./IO/bf.txt"))
        try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));PrintWriter printWriter = new PrintWriter(new FileWriter("./IO/bf.txt"));) {
            String str = null;
            while ((str = bufferedReader.readLine()) != null) {
//                bufferedWriter.write(str);
//                bufferedWriter.newLine();
//                bufferedWriter.flush();
                printWriter.println(str);
            }
        } catch (IOException e) {

        }
    }
}
